package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 采购订单详细实体
 */
@Data
@NoArgsConstructor
@TableName("t_buyorderinfo")
public class BuyOrderInfoBean {
    @TableId(value = "pk_buyOrderInfoId", type = IdType.AUTO)
    /**采购订单详情id*/
    private Integer id;
    @TableField("fk_buyOrderId")
    /**采购订单id*/
    private Integer buyOrderId;
    @TableField(exist = false)
    /**采购订单*/
    private BuyCarBean buyCar;
    @TableField("fk_productId")
    /**商品id*/
    private Integer productId;
    @TableField(exist = false)
    /**商品*/
    private ProductBean product;
    @TableField("boi_price")
    /**采购价*/
    private Integer price;
    @TableField("boi_num")
    /**采购数量*/
    private Integer num;

    public BuyOrderInfoBean(Integer buyOrderId, Integer productId, Integer price, Integer num) {
        this.buyOrderId = buyOrderId;
        this.productId = productId;
        this.price = price;
        this.num = num;
    }

    @Override
    public String toString() {
        return "BuyOrderInfoBean{" +
                "id=" + id +
                ", buyOrderId=" + buyOrderId +
                ", buyCar=" + buyCar +
                ", productId=" + productId +
                ", product=" + product +
                ", price=" + price +
                ", num=" + num +
                "}\n";
    }
}